Part Number Hot Search : 
AS7C256A SMAJ4747 DS28CM M5142 S30S40PT 36MHZ IVGD0158 1N414
Product Description
Full Text Search
 

To Download DS87C530 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1 of 44 112299 note: some revisions of this device may incorporate deviations from published spe cifications known as errata. multiple revisions of any device may be simultaneously available through various sales channels. for information about device errata, click here: http://www.maxim - ic.com/errata . features 80c52 - compatible - 8051 instruction set - compatible - four 8 - bit i/o ports - three 16 - bit timer/counters - 256 bytes scratchpad ram large on - chip memory - 16kb eprom (otp) - 1kb extra on - chip sram for movx romsize feature - selects effective on - chip rom size from 0 to 16kb - allows access to entire external memory map - dynamically adjustable by software - useful as boot block for external flash nonvolatile functions - on - chip real - time clock w/alarm interrupt - battery backup support of 1kb sram high - spee d architecture - 4 clocks/machine cycle (8051 = 12) - runs dc to 33mhz clock rates - single - cycle instruction in 121 ns - dual data pointer - optional variable length movx to access fast/slow ram /peripherals power management mode - programmable clock source saves pow er - runs from (crystal/64) or (crystal/1024) - provides automatic hardware and software exit emi reduction mode disables ale two full - duplex hardware serial ports high integration controller includes: - power - fail reset - early - warning power - fail interrupt - progra mmable watchdog timer 14 total interrupt sources with six external package outline DS87C530/ds83c530 eprom/rom micro with real - time clock www.maxim - ic.com dallas DS87C530 ds83c530 34 46 20 8 7 1 47 21 33 52 - pin plcc 52 - pin cer quad dallas DS87C530 ds83c530 39 27 1 13 26 40 14 52 52 - pin tqfp outline preliminary
DS87C530/ds83c530 2 of 44 description the DS87C530/ds83c530 eprom/rom micro with real time clock is an 8051 - compatible microcontroller based on the dallas high - s peed core. it uses 4 clocks per instruction cycle instead of 12 used by the standard 8051. it also provides a unique mix of peripherals not widely available on other processors. they include an on - chip real time clock (rtc) and battery back up support for an on - chip 1k x 8 sram. the new power management mode allows software to select reduced power operation while still processing. a combination of high performance microcontroller core, real time clock, battery backed sram, and power management makes the d s87c530/ds83c530 ideal for instruments and portable applications. it also provides several peripherals found on other dallas high - speed microcontrollers. these include two independent serial ports, two data pointers, on - chip power monitor with brown - out de tection and a watchdog timer. power management mode (pmm) allows software to select a slower cpu clock. while default operation uses four clocks per machine cycle, the pmm runs the processor at 64 or 1024 clocks per cycle. there is a corresponding drop in power consumption when the processor slows. the emi reduction feature allows software to select a reduced emission mode. this disables the ale signal when it is unneeded. the ds83c530 is a factory mask rom version of the DS87C530 designed for high - vol ume, cost - sensitive applications. it is identical in all respects to the DS87C530, except that the 16 kb of eprom is replaced by a user - supplied application program. all references to features of the DS87C530 will apply to the ds83c530, with the exception of eprom - specific features where noted. please contact your local dallas semiconductor sales representative for ordering information. note: the DS87C530/ds83c530 is a monolithic device. a user must supply an external battery or super - cap and a 32.768 kh z timekeeping crystal to have permanently powered timekeeping or nonvolatile ram. the DS87C530/ds83c530 provides all the support and switching circuitry needed to manage these resources. ordering information part number package max. clock speed temperatu re range DS87C530 - qcl 52 - pin plcc 33 mhz 0 c to 70 c DS87C530 - qnl 52 - pin plcc 33 mhz - 40 c to +85 c DS87C530 - kcl 52 - pin windowed cerquad 33 mhz 0 c to 70 c DS87C530 - ecl 52 - pin tqfp 33 mhz 0 c to 70 c DS87C530 - enl 52 - pin tqfp 33 mhz - 40 c to +85 c ds8 3c530 - qcl 52 - pin windowed cerquad 33 mhz 0 c to 70 c ds83c530 - qnl 52 - pin tqfp 33 mhz - 40 c to +85 c ds83c530 - ecl 52 - pin tqfp 33 mhz 0 c to 70 c ds83c530 - enl 52 - pin tqfp 33 mhz - 40 c to +85 c
DS87C530/ds83c530 3 of 44 DS87C530/ds83c530 block diagram figure 1 pin description table 1 plcc tqfp signal name description 52 45 v cc v cc - +5v . processor power supply. 1, 25 18, 46 gnd gnd - processor digital circuit ground. 29 22 v cc2 v cc2 - +5v real time clock supply. v cc2 is isolated from v cc to isolate the rtc from digital nois e. 26 19 gnd2 gnd2 - real time clock circuit ground. 12 5 rst rst - input . this pin contains a schmitt voltage input to recognize external active high reset inputs. the pin also employs an internal pulldown resistor to allow for a combination of wired or external reset sources. an rc is not required for power - up, as the device provides this function internally. 23 24 16 17 xtal2 xtal1 xtal1, xtal2 - the crystal oscillator pins provide support for parallel resonant, at cut crystals. xtal1 ac ts also as an input if there is an external clock source in place of a crystal. xtal2 is the output of the crystal amplifier.
DS87C530/ds83c530 4 of 44 plcc tqfp signal name description 38 31 psen psen - output . the program store enable output. this signal is a chip enable for optional external rom memory. psen will provide an active low pulse and is driven high when external rom is not being accessed. 39 32 ale ale - output . the address latch enable output latches the external address lsb from the multiplexed address/data bus on port 0. this signal is commonly connected to the latch enable of an external 373 family transparent latch. ale has a pulse width of 1.5 xtal1 cycles and a period of four xtal1 cycles. ale is forced high when the dev ice is in a reset condition. ale can be disabled and forced high by writing aleoff=1 (pmr.2). ale operates independently of aleoff during external memory accesses. 50 49 48 47 46 45 44 43 43 42 41 40 39 38 37 36 p0.0 (ad0) p0.1 (ad1) p0.2 (ad2) p0.3 (ad3) p0.4 (ad4) p0.5 (ad5) p0.6 (ad6) p0.7 (ad7) port 0 (ad0 - 7) - i/o . port 0 is an open - drain, 8 - bit bi - directional i/o port. as an alternate function port 0 can function as the multiplexed address/data bus to access off - chip memory. during the time when ale is high, the lsb of a memory address is presented. when ale falls to a logic 0, the port transitions to a bi - directional data bus. this bus is used to read external rom and read/ write external ram m emory or peripherals. when used as a memory bus, the port provides active high drivers. the reset condition of port 0 is tri - state. pullup resistors are required when using port 0 as an i/o port. 3 - 10 48 - 52, 1 - 3 p1.0 - p1.7 port 1 - i/o . port 1 functions as both an 8 - bit bi - directional i/o port and an alternate functional interface for timer 2 i/o, new external interrupts, and new serial port 1. the reset condition of port 1 is with all bits at a logic 1. in this state, a weak pullup holds the port high. t his condition also serves as an input mode, since any external circuit that writes to the port will overcome the weak pullup. when software writes a 0 to any port pin, the device will activate a strong pulldown that remains on until either a 1 is written o r a reset occurs. writing a 1 after the port has been at 0 will cause a strong transition driver to turn on, followed by a weaker sustaining pullup. once the momentary strong driver turns off, the port again becomes the output high (and input) state. the a lternate modes of port 1 are outlined as follows. 3 4 5 6 7 8 9 10 48 49 50 51 52 1 2 3 port alternate function p1.0 t2 external i/o for timer/counter 2 p1.1 t2ex timer/counter 2 capture/reload trigger p1.2 rxd1 serial port 1 input p1.3 txd1 serial port 1 output p1.4 int2 external interrupt 2 (positive edge detect) p1.5 int3 external interrupt 3 (negative edge detect) p1.6 int4 e xternal interrupt 4 (positive edge detect) p1.7 int5 external interrupt 5 (negative edge detect)
DS87C530/ds83c530 5 of 44 plcc tqfp signal name description 30 31 32 33 34 35 36 37 23 24 25 26 27 28 29 30 p2.0 (ad8) p2.1 (ad9) p2.2 (ad10) p2.3 (ad11) p2.4 (ad12) p2.5 (ad13) p2.6 (ad14) p2.7 (ad15) port 2 (a8 - 15) - i/o . port 2 is a bi - directional i/o port. the reset condition of port 2 is logic high. in this state, a weak pullup holds the port high. thi s condition also serves as an input mode, since any external circuit that writes to the port will overcome the weak pullup. when software writes a 0 to any port pin, the device will activate a strong pulldown that remains on until either a 1 is written or a reset occurs. writing a 1 after the port has been at 0 will cause a strong transition driver to turn on, followed by a weaker sustaining pullup. once the momentary strong driver turns off, the port again becomes both the output high and input state. as a n alternate function port 2 can function as msb of the external address bus. this bus can be used to read external rom and read/write external ram memory or peripherals. 15 - 22 15 16 17 18 19 20 21 22 8 - 15 8 9 10 11 12 13 14 15 p3.0 - p3.7 port 3 - i/o. port 3 functions as both an 8 - bit bi - directional i/o port and an alternate functional interface for external interrupts, serial port 0, timer 0 and 1 inputs, and rd and wr strobes. the reset condition of port 3 is with all bits at a logic 1. in this state, a weak pullup holds the port high. this condition also serves as an input mode, since any external circuit that writes to the po rt will overcome the weak pullup. when software writes a 0 to any port pin, the device will activate a strong pulldown that remains on until either a 1 is written or a reset occurs. writing a 1 after the port has been at 0 will cause a strong transition dr iver to turn on, followed by a weaker sustaining pullup. once the momentary strong driver turns off, the port again becomes both the output high and input state. the alternate modes of port 3 are outlined below. port alternate function p3.0 rxd0 serial port 0 input p3.1 txd0 serial port 0 output p3.2 int0 external interrupt 0 p3.3 int1 external interrupt 1 p3.4 t0 timer 0 external input p3.5 t1 timer 1 external input p3.6 wr external data memory write strobe p3.7 rd external data memory read strobe 42 35 ea ea - input. connect to ground to use an external rom. internal ram is still accessible as determined by register settings. connect to v cc to use internal rom. 51 44 v bat v bat - input. connect to the power source that maintains sram and rtc when v cc < v bat . may be connected to a 3v lithium battery or a s uper - cap. connect to gnd if battery will not be used with device.
DS87C530/ds83c530 6 of 44 plcc tqfp signal name description 27, 28 20, 21 rtcx2, rtcx1 rtcx2, rtcx1 - timekeeping crystal . a 32.768 khz crystal between these pins supplies the time - base for the real time clock. t he device supports both 6 pf and 12.5 pf load capacitance crystals as selected by an sfr bit described below. to prevent noise from affecting the rtc, the rtcx2 and rtcx1 pin should be guard - ringed with gnd2. 2, 11, 13, 14, 40, 41 4, 6, 7, 33, 34, 47 nc n c - reserved. these pins should not be connected. they are reserved for use with future devices in the family. compatibility the DS87C530/ds83c530 is a fully static, cmos 8051 - compatible microcontroller designed for high performance. while remaining fam iliar to 8051 users, it has many new features. in general, software written for existing 8051 - based systems works without modification on the DS87C530/ds83c530. the exception is critical timing since the high speed micro performs its instructions much fast er than the original for any given crystal selection. the DS87C530/ds83c530 runs the standard 8051 instruction set. it is not pin - compatible with other 8051s due to the timekeeping crystal. the DS87C530/ds83c530 provides three 16 - bit timer/counters, ful l - duplex serial port (2), 256 bytes of direct ram plus 1 kb of extra movx ram. i/o ports have the same operation as a standard 8051 product. timers will default to a 12 - clock per cycle operation to keep their timing compatible with original 8051 systems. h owever, timers are individually programmable to run at the new 4 clocks per cycle if desired. the pca is not supported. the DS87C530/ds83c530 provides several new hardware features implemented by new special function registers. a summary of these sfrs i s provided below. performance overview the DS87C530/ds83c530 features a high - speed, 8051 - compatible core. higher speed comes not just from increasing the clock frequency, but from a newer, more efficient design. this updated core does not have the dummy memory cycles that are present in a standard 8051. a conventional 8051 generates machine cycles using the clock frequency divided by 12. in the DS87C530/ds83c530, the same machine cycle takes 4 clocks. thus the fastest instruction, one machine cycle, execu tes three times faster for the same crystal frequency. note that these are identical instructions. the majority of instructions on the DS87C530/ds83c530 will see the full 3 to 1 speed improvement. some instructions will get between 1.5 and 2.4 to 1 improve ment. all instructions are faster than the original 8051. the numerical average of all opcodes gives approximately a 2.5 to 1 speed improvement. improvement of individual programs will depend on the actual instructions used. speed - sensitive applications w ould make the most use of instructions that are three times faster. however, the sheer number of 3 to 1 improved opcodes makes dramatic speed improvements likely for any code. these architecture improvements produce a peak instruction cycle in 121 ns (8.2 5 mips). the dual data pointer feature also allows the user to eliminate wasted instructions when moving blocks of memory.
DS87C530/ds83c530 7 of 44 instruction set summary all instructions perform the same functions as their 8051 counterparts. their effect on bits, flags, and oth er status functions is identical. however, the timing of each instruction is different. this applies both in absolute and relative number of clocks. for absolute timing of real - time events, the timing of software loops can be calculated using a table in t he high - speed microcontroller user?s guide. however, counter/timers default to run at the older 12 clocks per increment. in this way, timer - based events occur at the standard intervals with software executing at higher speed. timers optionally can run at 4 clocks per increment to take advantage of faster processor operation. the relative time of two instructions might be different in the new architecture than it was previously. for example, in the original architecture, the ?movx a, @dptr? instruction an d the ?mov direct, direct? instruction used two machine cycles or 24 oscillator cycles. therefore, they required the same amount of time. in the DS87C530/ds83c530, the movx instruction takes as little as two machine cycles or eight oscillator cycles but th e ?mov direct, direct? uses three machine cycles or 12 oscillator cycles. while both are faster than their original counterparts, they now have different execution times. this is because the DS87C530/ds83c530 usually uses one instruction cycle for each in struction byte. the user concerned with precise program timing should examine the timing of each instruction for familiarity with the changes. note that a machine cycle now requires just 4 clocks, and provides one ale pulse per cycle. many instructions re quire only one cycle, but some require five. in the original architecture, all were one or two cycles except for mul and div. refer to the high - speed microcontroller user?s guide for details and individual instruction timing. special function registers sp ecial function registers (sfrs) control most special features of the DS87C530/ds83c530. this allows the device to incorporate new features but remain instruction set compatible with the 8051. equate statements can be used to define the new sfr to an assemb ler or compiler. all sfrs contained in the standard 80c52 are duplicated in this device. table 2 shows the register addresses and bit locations. the high - speed microcontroller user?s guide describes all sfrs.
DS87C530/ds83c530 8 of 44 special function register locations table 2 * functions not present in the 80c52 are in bold register bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 address p0 p0.7 p0.6 p0.5 p0.4 p0.3 p0.2 p0.1 p0.0 80h sp 81h dpl 82h dph 83h dpl1 84h dph1 85h dps 0 0 0 0 0 0 0 sel 86h pcon smod_0 smod0 - - gf1 gf0 stop idle 87h tcon tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 88h tmod gate c/ t m1 m0 gate c/ t m1 m0 89h tl0 8ah tl1 8bh th0 8ch th1 8dh ckcon wd1 wd0 t2m t1m t0m md2 md1 md0 8eh p1 p1.7 p1.6 p1.5 p1.4 p1.3 p1.2 p1.1 p1.0 90h exif ie5 ie4 ie3 ie2 xt/rg rgmd rgsl bgs 91h trim e4k x12/ 6 trm2 trm2 trm1 trm1 trm0 trm0 96h scon0 sm0/fe_0 sm1_0 sm2_0 ren_0 tb8_0 rb8_0 ti_0 ri_0 98h sbuf0 99h p2 p2.7 p2.6 p2.5 p2.4 p2.3 p2.2 p2.1 p2.0 a0h ie ea es1 et2 es0 et1 ex1 et0 ex0 a8h saddr0 a9h saddr1 aah p3 p3.7 p3.6 p3.5 p3.4 p3.3 p3.2 p3.1 p3.0 b0h ip - ps1 pt2 ps0 pt1 px1 pt0 px0 b8h saden0 b9h saden1 bah scon1 sm0/fe_1 sm1_1 sm2_1 ren_1 tb8_1 rb8_1 ti_1 ri_1 c0h sbuf1 c1h romsize - - - - - rms2 rms1 rms0 c2h pmr cd1 cd0 swb - xtoff aleoff dme1 dme0 c4h statu s pip hip lip xtup spta1 spra1 spta0 spra0 c5h ta c7h t2con tf2 exf2 rclk tclk exen2 tr2 c/ t2 cp/ rl2 c8h t2mod - - - - - - t2oe dcen c9h rcap2l cah rcap2h cbh tl2 cch th2 cdh
DS87C530/ds83c530 9 of 44 register bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 address psw cy ac f0 rs1 rs0 ov fl p d0h wdcon smod_1 por epfi pfi wdip wtrf ewt rwt d8h acc e0h eie - - ertci ewdi ex5 ex4 ex3 ex2 e8h b f0h rtass f2h rtas 0 0 f3h rtam 0 0 f4h rtah 0 0 0 f5h eip - - prtci pwdi px5 px4 px3 px2 f8h rtcc ssce sce mce hce rtcre rtcwe rtcif rtce f9h rtcss fah rtcs 0 0 fbh rtcm 0 0 fch rtch fdh rtcd0 feh rtcd1 ffh nonvolatile functions the DS87C530/ds83c530 provides two functions that are permanently powered if a user supplies an external energy source. these are an on - chip real time clock and a nonvolatile sram. the chip contains all related functions and contro ls. the user must supply a backup source and a 32.768 khz timekeeping crystal. real time clock the on - chip real time clock (rtc) keeps time of day and calendar functions. its time base is a 32.768 khz crystal between pins rtcx1 and rtcx2. the rtc maintain s time to 1/256 of a second. it also allows a user to read (and write) seconds, minutes, hours, day of the week, and date. the clock organization is shown in figure 2. timekeeping registers allow easy access to commonly needed time values. for example, so ftware can simply check the elapsed number of minutes by reading one register. alternately, it can read the complete time of day, including subseconds, in only four registers. the calendar stores its data in binary form. while this requires software transl ation, it allows complete flexibility as to the exact value. a user can start the calendar with a variety of selections since it is simply a 16 - bit binary number of days. this number allows a total range of 179 years beginning from 0000. the rtc features a programmable alarm condition. a user selects the alarm time. when the rtc reaches the selected value, it sets a flag. this will cause an interrupt if enabled, even in stop mode. the alarm consists of a comparator that matches the user value against the r tc actual value. a user can select a match for 1 or more of the sub - seconds, seconds, minutes, or hours. this allows an interrupt automatically to occur once per second, once per minute, once per hour, or once per day. enabling interrupts with no match wi ll generate an interrupt 256 times per second. software enables the timekeeper oscillator using the rtc enable bit in the rtc control register (f9h). this starts the clock. it can disable the oscillator to preserve the life of the backup energy - source if
DS87C530/ds83c530 10 of 44 unneeded. values in the rtc control register are maintained by the backup source through power failure. once enabled, the rtc maintains time for the life of the backup source even when v cc is removed. the rtc will maintain an accuracy of 2 minutes per mo nth at 25 c. under no circumstances are negative voltages, of any amplitude, allowed on any pin while the device is in data retention mode (v cc < v bat ). negative voltages will shorten battery life, possibly corrupting the contents of internal sram and the rtc. real time clock figure 2 nonvolatile ram the 1k x 8 on - chip sram can be nonvolatile if an external backup energy source is used. this allows the device to log data or to store configuration settings. internal switching circuits will detect the los s of v cc and switch sram power to the backup source on the v bat pin. the 256 bytes of direct ram are not affected by this circuit and are volatile. crystal and backup sources to use the unique functions of the DS87C530/ds83c530, a 32.768 khz timekeeping c rystal and a backup energy source are needed. the following describes guidelines for choosing these devices. timekeeping crystal the DS87C530/ds83c530 can use a standard 32.768 khz crystal as the rtc time base. there are two versions of standard crystals available, with 6 pf and 12.5 pf load capacitance. the tradeoff is that the 6 pf uses less power, giving longer life while v cc is off, but is more sensitive to noise and board layout. the 12.5 pf crystal uses more power, giving a shorter battery backed lif e, but produces a more robust oscillator. bit 6 in the rtc trim register (trim; 96h) must be programmed to specify the crystal type for the oscillator. when trim.6 = 1, the circuit expects a 12.5 pf crystal. when trim.6 = 0, it expects a 6 pf crystal. this bit will be nonvolatile so these choices will remain while the backup source is present. a guard ring (connected to the real time clock ground) should encircle the rtcx1 and rtcx2 pins. backup energy source the DS87C530/ds83c530 uses an external energy s ource to maintain timekeeping and sram data without v cc . this source can be either a battery or 0.47 f super cap and should be connected to the v bat
DS87C530/ds83c530 11 of 44 pin. the nominal battery voltage is 3v. the v bat pin will not source current. therefore, a super cap requir es an external resistor and diode to supply charge. the backup lifetime is a function of the battery capacity and the data retention current drain. this drain is specified in the electrical specifications. the circuit loads the v bat only when v cc has fall en below v bat . thus the actual lifetime depends not only on the current and battery capacity, but also on the portion of time without power. a very small lithium cell provides a lifetime of more than 10 years. internal backup circuit figure 3 important application note the pins on the DS87C530/ds83c530 are generally as resilient as other cmos circuits. they have no unusual susceptibility to electrostatic discharge (esd) or other electrical transients. however, no pin on the DS87C530/ds83c530 should ever be taken to a voltage below ground. negative voltages on any pin can turn on internal parasitic diodes that draw current directly from the battery. if a device pin is connected to the ?outside world? where it may be handled or come in contact with electri cal noise, protection should be added to prevent the device pin from going below - 0.3v. some power supplies can give a small undershoot on power up, which should be prevented. application note 93, ?design guidelines for microcontrollers incorporating nv r am,? discusses how to protect the DS87C530/ds83c530 against these conditions. memory resources like the 8051, the DS87C530/ds83c530 uses three memory areas. the total memory configuration of the device is 16kb of rom, 1kb of data sram and 256 bytes of scr atchpad or direct ram. the 1kb of data space sram is read/write accessible and is memory mapped. this on - chip sram is reached by the movx instruction. it is not used for executable memory. the scratchpad area is 256 bytes of register mapped ram and is iden tical to the ram found on the 80c52. there is no conflict or overlap among the 256 bytes and the 1 kb as they use different addressing modes and separate instructions. operational consideration the erasure window of the windowed cerquad should be covered without regard to the programmed/ unprogrammed state of the eprom. otherwise, the device may not meet the ac and dc parameters listed in the datasheet.
DS87C530/ds83c530 12 of 44 program memory access on - chip rom begins at address 0000h and is contiguous through 3fffh (16kb). excee ding the maximum address of on - chip rom will cause the DS87C530/ds83c530 to access off - chip memory. however, the maximum on - chip decoded address is selectable by software using the romsize feature. software can cause the microcontroller to behave like a device with less on - chip memory. this is beneficial when overlapping external memory, such as flash, is used. the maximum memory size is dynamically variable. thus a portion of memory can be removed from the memory map to access off - chip memory, then res tored to access on - chip memory. in fact, all of the on - chip memory can be removed from the memory map allowing the full 64 kb memory space to be addressed from off - chip memory. rom addresses that are larger than the selected maximum are automatically fetch ed from outside the part via ports 0 and 2. a depiction of the rom memory map is shown in figure 4. the romsize register is used to select the maximum on - chip decoded address for rom. bits rms2, rms1, rms0 have the following effect: rms2 rms1 rms0 maximu m on - chip rom address 0 0 0 0 kb 0 0 1 1 kb 0 1 0 2 kb 0 1 1 4 kb 1 0 0 8 kb 1 0 1 16 kb (default) 1 1 0 invalid - reserved 1 1 1 invalid - reserved the reset default condition is a maximum on - chip rom address of 16 kb. thus no action is require d if this feature is not used. when accessing external program memory, the first 16 kb would be inaccessible. to select a smaller effective rom size, software must alter bits rms2 - rms0. altering these bits requires a timed access procedure as explained bel ow. care should be taken so that changing the romsize register does not corrupt program execution. for example, assume that a device is executing instructions from internal program memory near the 12 kb boundary (~3000h) and that the romsize register is c urrently configured for a 16 kb internal program space. if software reconfigures the romsize register to 4 kb (0000h - 0fffh) in the current state, the device will immediately jump to external program execution because program code from 4kb to 16kb (1000h - 3f ffh) is no longer located on - chip. this could result in code misalignment and execution of an invalid instruction. the recommended method is to modify the romsize register from a location in memory that will be internal (or external) both before and after the operation. in the above example, the instruction which modifies the romsize register should be located below the 4 kb (1000h) boundary, so that it will be unaffected by the memory modification. the same precaution should be applied if the internal prog ram memory size is modified while executing from external program memory. off - chip memory is accessed using the multiplexed address/data bus on p0 and the msb address on p2. while serving as a memory bus, these pins are not i/o ports. this convention fol lows the standard 8051
DS87C530/ds83c530 13 of 44 method of expanding on - chip memory. off - chip rom access also occurs if the ea pin is a logic 0. ea overrides all bit settings. the psen signal will go active (low) to serve as a chip enable or output enable when ports 0 and 2 fetch from external rom. rom memory map figure 4 data memory access unlike many 8051 derivatives, the DS87C530/ds83c530 contains on - chip data memory. it also contains the standard 256 bytes of ram a ccessed by direct instructions. these areas are separate. the movx instruction accesses the on - chip data memory. although physically on - chip, software treats this area as though it was located off - chip. the 1 kb of sram is between address 0000h and 03ffh. access to the on - chip data ram is optional under software control. when enabled by software, the data sram is between 0000h and 03ffh. any movx instruction that uses this area will go to the on - chip ram while enabled. movx addresses greater than 03ffh automatically go to external memory through ports 0 and 2. when disabled, the 1 kb memory area is transparent to the system memory map. any movx directed to the space between 0000h and ffffh goes to the expanded bus on ports 0 and 2. this also is the defa ult condition. this default allows the DS87C530/ds83c530 to drop into an existing system that uses these addresses for other hardware and still have full compatibility. the on - chip data area is software selectable using 2 bits in the power management r egister at location c4h. this selection is dynamically programmable. thus access to the on - chip area becomes transparent to reach off - chip devices at the same addresses. the control bits are dme1 (pmr.1) and dme0 (pmr.0). they have the following operation : data memory access control table 3 dme1 dme0 data memory address memory function 0 0 0000h - ffffh external data memory * default condition 0 1 0000h - 03ffh 0400h - ffffh internal sram data memory external data memory 1 0 reserved reserved 1 1 0000h - 03ffh 0400h - fffbh fffch fffdh - fffh internal sram data memory reserved - no external access read access to the status of lock bits reserved - no external access
DS87C530/ds83c530 14 of 44 notes on the status byte read at fffch with dme1, 0 = 1, 1: bits 2 - 0 reflect the programmed st atus of the security lock bits lb2 - lb0. they are individually set to a logic 1 to correspond to a security lock bit that has been programmed. these status bits allow software to verify that the part has been locked before running if desired. the bits are r ead - only. note: after internal movx sram has been initialized, changing bits dem0/1 will have no affect on the contents of the sram. stretch memory cycle the DS87C530/ds83c530 allows software to adjust the speed of off - chip data memory access. the microc ontroller is capable of performing the movx in as few as two instruction cycles. the on - chip sram uses this speed and any movx instruction directed internally uses two cycles. however, the time can be stretched for interface to external devices. this allow s access to both fast memory and slow memory or peripherals with no glue logic. even in high - speed systems, it may not be necessary or desirable to perform off - chip data memory access at full speed. in addition, there are a variety of memory mapped periphe rals such as lcds or uarts that are slow. the stretch movx is controlled by the clock control register at sfr location 8eh as described below. it allows the user to select a stretch value between 0 and 7. a stretch of 0 will result in a two - machine cycle movx. a stretch of 7 will result in a movx of nine machine cycles. software can dynamically change this value depending on the particular memory or peripheral. on reset, the stretch value will default to a 1, resulting in a three - cycle movx for any extern al access. therefore, off - chip ram access is not at full speed. this is a convenience to existing designs that may not have fast ram in place. internal sram access is always at full speed regardless of the stretch setting. when desiring maximum speed, soft ware should select a stretch value of 0. when using very slow ram or peripherals, select a larger stretch value. note that this affects data memory only and the only way to slow program memory (rom) access is to use a slower crystal. using a stretch val ue between 1 and 7 causes the microcontroller to stretch the read/write strobe and all related timing. also, setup and hold times are increased by 1 clock when using any stretch greater than 0. this results in a wider read/write strobe and relaxed interfac e timing, allowing more time for memory/peripherals to respond. the timing of the variable speed movx is in the electrical specifications. table 4 shows the resulting strobe widths for each stretch value. the memory stretch uses the clock control special function register at sfr location 8eh. the stretch value is selected using bits ckcon.2 - 0. in the table, these bits are referred to as m2 through m0. the first stretch (default) allows the use of common 120 ns rams without dramatically lengthening the memo ry access.
DS87C530/ds83c530 15 of 44 data memory cycle stretch values table 4 ckcon.2 - 0 m2 m1 m0 memory cycles rd or wr strobe width in clocks strobe width time @ 33 mhz 0 0 0 2 (forced internal) 2 60 ns 0 0 1 3 (default external) 4 121 ns 0 1 0 4 8 242 ns 0 1 1 5 12 364 ns 1 0 0 6 16 485 ns 1 0 1 7 20 606 ns 1 1 0 8 24 727 ns 1 1 1 9 28 848 ns dual data pointer the timing of block moves of data memory is faster using the dual data pointer (dptr). the standard 8051 dptr is a 1 6 - bit value that is used to address off - chip data ram or peripherals. in the DS87C530/ds83c530, the standard data pointer is called dptr, located at sfr addresses 82h and 83h. these are the standard locations. using dptr requires no modification of standar d code. the new dptr at sfr 84h and 85h is called dptr1. the dptr select bit (dps) chooses the active pointer. its location is the lsb of the sfr location 86h. no other bits in register 86h have any effect and are 0. the user switches between data pointers by toggling the lsb of register 86h. the increment (inc) instruction is the fastest way to accomplish this. all dptr - related instructions use the currently selected dptr for any activity. therefore it takes only one instruction to switch from a source to a destination address. using the dual data pointer saves code from needing to save source and destination addresses when doing a block move. the software simply switches between dptr and 1 once software loads them. the relevant register locations are as f ollows. dpl 82h low byte original dptr dph 83h high byte original dptr dpl1 84h low byte new dptr dph1 85h high byte new dptr dps 86h dptr select (lsb) power management along with the standard idle and power - down (stop) modes of the st andard 80c52, the DS87C530/ds83c530 provides a new power management mode. this mode allows the processor to continue functioning, yet to save power compared with full operation. the DS87C530/ds83c530 also features several enhancements to stop mode that ma ke it more useful. power management mode (pmm) power management mode offers a complete scheme of reduced internal clock speeds that allow the cpu to run software but to use substantially less power. during default operation, the DS87C530/ds83c530 uses fou r clocks per machine cycle. thus the instruction cycle rate is (clock/4). at 33 mhz crystal speed, the instruction cycle speed is 8.25 mhz (33/4). in pmm, the microcontroller continues to operate but uses an internally divided version of the clock source. this creates a lower power state without external components. it offers a choice of two reduced instruction cycle speeds (and two clock sources - discussed below). the speeds are (clock/64) and (clock/1024).
DS87C530/ds83c530 16 of 44 software is the only mechanism to invoke the pm m. table 5 illustrates the instruction cycle rate in pmm for several common crystal frequencies. since power consumption is a direct function of operating speed, pmm 1 eliminates most of the power consumption while still allowing a reasonable speed of pro cessing. pmm 2 runs very slowly and provides the lowest power consumption without stopping the cpu. this is illustrated in table 6. note that pmm provides a lower power condition than idle mode. this is because in idle, all clocked functions such as tim ers run at a rate of crystal divided by 4. since wake - up from pmm is as fast as or faster than from idle and pmm allows the cpu to operate (even if doing nops), there is little reason to use idle mode in new designs. machine cycle rate table 5 crystal spe ed full operation (4 clocks) pmm1 (64 clocks) pmm2 (1024 clocks) 11.0592 mhz 2.765 mhz 172.8 khz 10.8 khz 16 mhz 4.00 mhz 250.0 khz 15.6 khz 25 mhz 6.25 mhz 390.6 khz 24.4 khz 33 mhz 8.25 mhz 515.6 kh z 32.2 khz typical operating current in pmm table 6 crystal speed full operation (4 clocks) pmm1 (64 clocks) pmm2 (1024 clocks) 11.0592 mhz 13.1 ma 5.3 ma 4.8 ma 16 mhz 17.2 ma 6.4 ma 5.6 ma 25 mhz 2 5.7 ma 8.1 ma 7.0 ma 33 mhz 32.8 ma 9.8 ma 8.2 ma crystaless pmm a major component of power consumption in pmm is the crystal amplifier circuit. the DS87C530/ds83c530 allows the user to switch cpu operation to an internal ring oscillator and turn off th e crystal amplifier. the cpu would then have a clock source of approximately 2 - 4 mhz, divided by either 4, 64, or 1024. the ring is not accurate, so software cannot perform precision timing. however, this mode allows an additional saving of between 0.5 an d 6.0 ma, depending on the actual crystal frequency. while this saving is of little use when running at 4 clocks per instruction cycle, it makes a major contribution when running in pmm1 or pmm2. pmm operation software invokes the pmm by setting the appro priate bits in the sfr area. the basic choices are divider speed and clock source. there are three speeds (4, 64, and 1024) and two clock sources (crystal, ring). both the decisions and the controls are separate. software will typically select the clock sp eed first. then, it will perform the switch to ring operation if desired. lastly, software can disable the crystal amplifier if desired. there are two ways of exiting pmm. software can remove the condition by reversing the procedure that invoked pmm or hardware can (optionally) remove it. to resume operation at a divide by 4 rate under software control, simply select 4 clocks per cycle, then crystal based operation if relevant. when
DS87C530/ds83c530 17 of 44 disabling the crystal as the time base in favor of the ring oscillator, there are timing restrictions associated with restarting the crystal operation. details are described below. there are three registers containing bits that are concerned with pmm functions. they are power management register (pmr; c4h), status (status; c5 h), and external interrupt flag (exif; 91h) clock divider software can select the instruction cycle rate by selecting bits cd1 (pmr.7) and cd0 (pmr.6) as follows: cd1 cd0 cycle rate 0 0 reserved 0 1 4 clocks (default) 1 0 64 clocks 1 1 1024 clocks the selection of instruction cycle rate will take effect after a delay of one instruction cycle. note that the clock divider choice applies to all functions including timers. since baud rates are altered, it will be difficult to conduct seri al communication while in pmm. there are minor restrictions on accessing the clock selection bits. the processor must be running in a 4 clock state to select either 64 (pmm1) or 1024 (pmm2) clocks. this means software cannot go directly from pmm1 to pmm2 o r visa versa. it must return to a 4 - clock rate first. switchback to return to a 4 - clock rate from pmm, software can simply select the cd1 and cd0 clock control bits to the 4 clocks per cycle state. however, the DS87C530/ds83c530 provides several hardware alternatives for automatic switchback. if switchback is enabled, then the device will automatically return to a 4 - clock per cycle speed when an interrupt occurs from an enabled, valid external interrupt source. a switchback will also occur when a uart dete cts the beginning of a serial start bit if the serial receiver is enabled (ren=1). note the beginning of a start bit does not generate an interrupt; this occurs on reception of a complete serial word. the automatic switchback on detection of a start bit a llows hardware to correct baud rates in time for a proper serial reception. a switchback will also occur when a byte is written to the sbuf0 or sbuf1 for transmission. switchback is enabled by setting the swb bit (pmr.5) to a 1 in software. for an exter nal interrupt, switchback will occur only if the interrupt source could really generate the interrupt. for example, if int0 is enabled but has a low priority setting, then switchback will not occur on int0 if the cpu i s servicing a high priority interrupt. status information in the status register assists decisions about switching into pmm. this register contains information about the level of active interrupts and the activity on the serial ports. the DS87C530/ds83c5 30 supports three levels of interrupt priority. these levels are power - fail, high, and low. bits status.7 - 5 indicate the service status of each level. if pip (power - fail interrupt priority; status. 7) is a 1, then the processor is servicing this level. if either hip (high interrupt priority; status.6) or lip (low interrupt priority; status.5) is high, then the corresponding level is in service.
DS87C530/ds83c530 18 of 44 software should not rely on a lower priority level interrupt source to remove pmm (switchback) when a higher leve l is in service. check the current priority service level before entering pmm. if the current service level locks out a desired switchback source, then it would be advisable to wait until this condition clears before entering pmm. alternately, software ca n prevent an undesired exit from pmm by entering a low priority interrupt service level before entering pmm. this will prevent other low priority interrupts from causing a switchback. status also contains information about the state of the serial ports. s erial port zero receive activity (spra0; status.0) indicates a serial word is being received on serial port 0 when this bit is set to a 1. serial port 0 transmit activity (spta0; status.1) indicates that the serial port is still shifting out a serial trans mission. status.2 and status.3 provide the same information for serial port 1, respectively. these bits should be interrogated before entering pmm1 or pmm2 to ensure that no serial port operations are in progress. changing the clock divisor rate during a s erial transmission or reception will corrupt the operation. crystal/ring operation the DS87C530/ds83c530 allows software to choose the clock source as an independent selection from the instruction cycle rate. the user can select crystal - based or ring osci llator - based operation under software control. power - on reset default is the crystal (or external clock) source. the ring may save power depending on the actual crystal speed. to save still more power, software can then disable the crystal amplifier. this process requires two steps. reversing the process also requires two steps. the xt/ rg bit (exif.3) selects the crystal or ring as the clock source. setting xt/ rg = 1 selects the crystal. setting xt/ rg = 0 selects the ring. the rgmd (exif.2) bit serves as a status bit by indicating the active clock source. rgmd = 0 indicates the cpu is running from the crystal. rgmd = 1 indicates it is running from the ring. when operating from the ring, disable the crystal amplifier by setting the xtoff bit (pmr.3) to a 1. this can only be done when xt/ rg = 0. when changing the clock source, the selection will take effect after a one instruction cycle delay. this applies to changes from crys tal to ring and vise versa. however, this assumes that the crystal amplifier is running. in most cases, when the ring is active, software previously disabled the crystal to save power. if ring operation is being used and the system must switch to crystal o peration, the crystal must first be enabled. set the xtoff bit to a 0. at this time, the crystal oscillation will begin. the DS87C530/ds83c530 then provides a warm - up delay to make certain that the frequency is stable. hardware will set the xtup bit (statu s.4) to a 1 when the crystal is ready for use. then software should write xt/ rg to a 1 to begin operating from the crystal. hardware prevents writing xt/ rg to a 1 before xtup = 1. the delay between xtoff = 0 and xt up = 1 will be 65,536 crystal clocks in addition to the crystal cycle startup time. switchback has no effect on the clock source. if software selects a reduced clock divider and enables the ring, a switchback will only restore the divider speed. the ri ng will remain as the time base until altered by software. if there is serial activity, switchback usually occurs with enough time to create proper baud rates. this is not true if the crystal is off and the cpu is running from the ring. if sending a seri al character that wakes the system from crystal - less pmm, then it should be a dummy character of no importance with a subsequent delay for crystal startup. the following table is a summary of the bits relating to pmm and its operation. the flow chart belo w illustrates a typical decision set associated with pmm.
DS87C530/ds83c530 19 of 44 pmm control and status bit summary table 7 bit name location function reset write access xt/ rg exif.3 control. xt/ rg =1, runs from crystal or external cloc k; xt/ rg =0, runs from internal ring oscillator. x 0 to 1 only when xtup=1 and xtoff=0 rgmd exif.2 status. rgmd=1, cpu clock = ring; rgmd=0, cpu clock = crystal. 0 none cd1, cd0 pmr7, pmr.6 control. cd1,0=01, 4 clocks; cs1,0=10, pmm1; cd1,0=11, pmm2. 0, 1 write cd1,0=10 or 11 only from cd1,0=01 swb pmr.5 control. swb=1, hardware invokes switchback to 4 clocks, swb=0, no hardware switchback. 0 unrestricted xtoff pmr.3 control. disables crystal operation after ring is selected. 0 1 onl y when xt/ rg =0 pip status.7 status. 1 indicates a power - fail interrupt in service. 0 none hip status.6 status. 1 indicates high priority interrupt in service. 0 none lip status.5 status. 1 indicates low priority interrupt in service . 0 none xtup status.4 status. 1 indicates that the crystal has stabilized. 1 none spta1 status.3 status. serial transmission on serial port 1. 0 none spra1 status.2 status. serial word reception on serial port 1. 0 none spta0 status.1 status. serial transmission on serial port 0. 0 none spra0 status.0 status. serial word reception on serial port 0. 0 none
DS87C530/ds83c530 20 of 44 invoking and clearing pmm figure 3
DS87C530/ds83c530 21 of 44 idle mode setting the lsb of the power control register (pcon; 87h) invokes the idle mode. idle will leav e internal clocks, serial ports and timers running. power consumption drops because the cpu is not active. since clocks are running, the idle power consumption is a function of crystal frequency. it should be approximately ? of the operational power at a g iven frequency. the cpu can exit the idle state with any interrupt or a reset. idle is available for backward software compatibility. the system can now reduce power consumption to below idle levels by using pmm1 or pmm2 and running nops. stop mode enhanc ements setting bit 1 of the power control register (pcon; 87h) invokes the stop mode. stop mode is the lowest power state since it turns off all internal clocking. the i cc of a standard stop mode is approximately 1 m a but is specified in the electrical specifications. the cpu will exit stop mode from an external interrupt or a reset condition. internally generated interrupts (timer, serial port, watchdog) are not useful since they require clocking activity. one exce ption is that a real time clock interrupt can cause the device to exit stop mode. this provides a very power efficient way of performing infrequent yet periodic tasks. the DS87C530/ds83c530 provides two enhancements to the stop mode. as documented below, the device provides a band - gap reference to determine power - fail interrupt and reset thresholds. the default state is that the band - gap reference is off while in stop mode. this allows the extremely low - power state mentioned above. a user can optionally c hoose to have the band - gap enabled during stop mode. with the band - gap reference enabled, pfi and power - fail reset are functional and are a valid means for leaving stop mode. this allows software to detect and compensate for a brown - out or power supply sag , even when in stop mode. in stop mode with the band - gap enabled, i cc will be approximately 50 m a compared with 1 m a with the band - gap off. if a user does not require a power - fail reset or interrupt while in stop mode, the band - gap can remain disabled. only the most power sensitive applications should turn off the band - gap, as this results in an unc ontrolled power - down condition. the control of the band - gap reference is located in the extended interrupt flag register (exif; 91h). setting bgs (exif.0) to a 1 will keep the band - gap reference enabled during stop mode. the default or reset condition i s with the bit at a logic 0. this results in the band - gap being off during stop mode. note that this bit has no control of the reference during full power, pmm, or idle modes. the second feature allows an additional power saving option while also making s top easier to use. this is the ability to start instantly when exiting stop mode. it is the internal ring oscillator that provides this feature. this ring can be a clock source when exiting stop mode in response to an interrupt. the benefit of the ring osc illator is as follows. using stop mode turns off the crystal oscillator and all internal clocks to save power. this requires that the oscillator be restarted when exiting stop mode. actual startup time is crystal - dependent, but is normally at least 4 ms. a common recommendation is 10 ms. in an application that will wake up, perform a short operation, then return to sleep, the crystal startup can be longer than the real transaction. however, the ring oscillator will start instantly. running from the ring, t he user can perform a simple operation and return to sleep before the crystal has even started. if a user selects the ring to provide the startup clock and the processor remains running, hardware will automatically switch to the crystal once a power - on res et interval (65536 clocks) has expired. hardware uses this value to assure proper crystal start even though power is not being cycled.
DS87C530/ds83c530 22 of 44 the ring oscillator runs at approximately 2 - 4 mhz but will not be a precise value. do not conduct real - time precision operations (including serial communication) during this ring period. figure 4 shows how the operation would compare when using the ring, and when starting up normally. the default state is to exit stop mode without using the ring oscillator. the rgsl - ri ng select bit at exif.1 (exif; 91h) controls this function. when rgsl = 1, the cpu will use the ring oscillator to exit stop mode quickly. as mentioned above, the processor will automatically switch from the ring to the crystal after a delay of 65,536 crys tal clocks. for a 3.57 mhz crystal, this is approximately 18 ms. the processor sets a flag called rgmd - ring mode, located at exif.2, that tells software that the ring is being used. the bit will be a logic 1 when the ring is in use. attempt no serial com munication or precision timing while this bit is set, since the operating frequency is not precise. ring oscillator exit from stop mode figure 4 note: diagram assumes that the operation following stop requires less than 18 ms to complete. emi reducti on one of the major contributors to radiated noise in an 8051 based system is the toggling of ale. the DS87C530/ds83c530 allows software to disable ale when not used by setting the aleoff (pmr.2) bit to a 1. when aleoff = 1, ale will still toggle during an off - chip movx. however, ale will remain in a static when performing on - chip memory access. the default state of aleoff = 0 so ale toggles with every instruction cycle. peripheral overview the DS87C530/ds83c530 provides several of the most commonly needed peripheral functions in microcomputer - based systems. these new functions include a second serial port, power - fail reset, power - fail interrupt, and a programmable watchdog timer. these are described below, and more details are available in the high - speed microcontroller user?s guide.
DS87C530/ds83c530 23 of 44 serial ports the DS87C530/ds83c530 provides a serial port (uart) that is identical to the 80c52. in addition it includes a second hardware serial port that is a full duplicate of the standard one. this port optionally uses pi ns p1.2 (rxd1) and p1.3 (txd1). it has duplicate control functions included in new sfr locations. both ports can operate simultaneously but can be at different baud rates or even in different modes. the second serial port has similar control registers ( scon1; c0h, sbuf1; c1h) to the original. the new serial port can only use timer 1 for timer - generated baud rates. timer rate control there is one important difference between the DS87C530/ds83c530 and 8051 regarding timers. the original 8051 used 12 clock s per cycle for timers as well as for machine cycles. the DS87C530/ds83c530 architecture normally uses 4 clocks per machine cycle. however, in the area of timers and serial ports, the DS87C530/ds83c530 will default to 12 clocks per cycle on reset. this al lows existing code with real - time dependencies such as baud rates to operate properly. if an application needs higher speed timers or serial baud rates, the user can select individual timers to run at the 4 - clock rate. the clock control register (ckcon; 8eh) determines these timer speeds. when the relevant ckcon bit is a logic 1, the DS87C530/ds83c530 uses 4 clocks per cycle to generate timer speeds. when the bit is a 0, the DS87C530 uses 12 clocks for timer speeds. the reset condition is a 0. ckcon.5 se lects the speed of timer 2. ckcon.4 selects timer 1 and ckcon.3 selects timer 0. unless a user desires very fast timing, it is unnecessary to alter these bits. note that the timer controls are independent. power - fail reset the DS87C530/ds83c530 uses a pre cision band - gap voltage reference to decide if v cc is out of tolerance. while powering up, the internal monitor circuit maintains a reset state until v cc rises above the v rst level. once above this level, the monitor enables the crystal oscillator and cou nts 65536 clocks. it then exits the reset state. this power - on reset (por) interval allows time for the oscillator to stabilize. a system needs no external components to generate a power - related reset. anytime v cc drops below v rst , as in power failure or a power drop, the monitor will generate and hold a reset. it occurs automatically, needing no action from the software. refer to the electrical specifications for the exact value of v rst . power - fail interrupt the voltage reference that sets a precise res et threshold also generates an optional early warning power - fail interrupt (pfi). when enabled by software, the processor will vector to program memory address 0033h if v cc drops below v pfw . pfi has the highest priority. the pfi enable is in the watchdog c ontrol sfr (wdcon - d8h). setting wdcon.5 to a logic 1 will enable the pfi. application software can also read the pfi flag at wdcon.4. a pfi condition sets this bit to a 1. the flag is independent of the interrupt enable and software must manually clear it. if the pfi is enabled and the band - gap select bit (bgs) is set, a pfi will bring the device out of stop mode. watchdog timer to prevent software from losing control, the DS87C530/ds83c530 includes a programmable watchdog timer. the watchdog is a free running timer that sets a flag if allowed to reach a preselected time - out. it can be (re)started by software.
DS87C530/ds83c530 24 of 44 a typical application is to select the flag as a reset source. when the watchdog times out it sets its flag, which generates reset. software must restart the timer before it reaches its time - out or the processor is reset. software can select one of four time - out values. then, it restarts the timer and enables the reset function. after enabling the reset function, software must then restart the ti mer before its expiration or hardware will reset the cpu. both the watchdog reset enable and the watchdog restart control bits are protected by a ?timed access? circuit. this prevents errant software from accidentally clearing the watchdog. time - out values are precise since they are a function of the crystal frequency as shown in table 8. for reference, the time periods at 33 mhz also are shown. the watchdog also provides a useful option for systems that do not require a reset circuit. it will set an inter rupt flag 512 clocks before setting the reset flag. software can optionally enable this interrupt source. the interrupt is independent of the reset. a common use of the interrupt is during debug, to show developers where the watchdog times out. this indica tes where the watchdog must be restarted by software. the interrupt also can serve as a convenient time - base generator or can wake - up the processor from power saving modes. the watchdog function is controlled by the clock control (ckcon - 8eh), watchdog control (wdcon - d8h), and extended interrupt enable (eie - e8h) sfrs. ckcon.7 and ckcon.6 are wd1 and wd0 respectively and they select the watchdog time - out period as shown in table 8. watchdog time - out values table 8 wd1 wd0 interrupt time - out time ( 33 mhz) reset time - out time (33 mhz) 0 0 2 17 clocks 3.9718 ms 2 17 + 512 clocks 3.9874 ms 0 1 2 20 clocks 31.77 ms 2 20 + 512 clocks 31.79 ms 1 0 2 23 clocks 254.20 ms 2 23 + 512 clocks 254.21 ms 1 1 2 26 clocks 2033.60 ms 2 26 + 512 clocks 2033.62 ms as shown above, the watchdog timer uses the crystal frequency as a time base. a user selects one of four counter values to determine the time - out. these clock counter lengths are 2 17 = 131,072 clocks; 2 20 = 1,048,576; 2 23 = 8,388,608 clocks; and 2 26 = 67,1 08,864 clocks. the times shown in table 8 above are with a 33 mhz crystal frequency. once the counter chain has completed a full interrupt count, hardware will set an interrupt flag. regardless of whether the user enables this interrupt, there are then 512 clocks left until the reset flag is set. software can enable the interrupt and reset individually. note that the watchdog is a free running timer and does not require an enable. there are 5 control bits in special function registers that affect the wat chdog timer and two status flags that report to the user. wdif (wdcon.3) is the interrupt flag that is set at timer termination when there are 512 clocks remaining until the reset flag is set. wtrf (wdcon.2) is the flag that is set when the timer has compl etely timed out. this flag is normally associated with a cpu reset and allows software to determine the reset source. ewt (wdcon.1) is the enable for the watchdog timer reset function. rwt (wdcon.0) is the bit that software uses to restart the watchdog ti mer. setting this bit restarts the timer for another full interval. application software must set this bit before the time - out. both of these bits are protected by timed access discussed below. as mentioned previously, wd1 and 0 (ckcon .7 and 6) select the time - out. the reset watchdog timer bit (wdcon.0) should be asserted prior to modifying the watchdog timer mode select bits (wd1, wd0) to avoid corruption of the watchdog count. finally, the
DS87C530/ds83c530 25 of 44 user can enable the watchdog interrupt using ewdi (eie.4). the s pecial function register map is shown above. interrupts the DS87C530/ds83c530 provides 14 interrupt sources with three priority levels. the power - fail interrupt (pfi) has the highest priority. software can assign high or low priority to other sources. all interrupts that are new to the 8051 family, except for the pfi, have a lower natural priority than the originals. interrupt sources and priorities table 9 name description vector natural priority 8051/dallas pfi power fail interrupt 33h 1 dallas int0 external interrupt 0 03h 2 8051 tf0 timer 0 0bh 3 8051 int1 external interrupt 1 13h 4 8051 tf1 timer 1 1bh 5 8051 scon0 ti0 or ri0 from serial port 0 23h 6 8051 tf2 timer 2 2bh 7 8051 scon1 ti1 or ri1 from serial port 1 3bh 8 dallas int2 external interrupt 2 43h 9 dallas int3 external interrupt 3 4bh 10 dallas int4 external interrupt 4 53h 11 dallas int5 external interrupt 5 5bh 12 dallas wdti watchdog time - out interrupt 63h 13 dallas rtci real time clock interrupt 6bh 14 dallas timed access protection it is useful to protect certain sfr bits from an accidental write operation. the timed access procedure stops an errant cpu from accidentally changing these bits. it requ ires that the following instructions precede a write of a protected bit. mov 0c7h, #0aah mov 0c7h, #55h writing an aah then a 55h to the timed access register (location c7h) opens a three - cycle window for write access. the window allows software t o modify a protected bit(s). if these instructions do not immediately precede the write operation, then the write will not take effect. the protected bits are:
DS87C530/ds83c530 26 of 44 exif.0 bgs band - gap select wdcon.6 por power - on reset flag wdcon.1 ewt enable watch dog reset wdcon.0 rwt restart watchdog wdcon.3 wdif watchdog interrupt flag romsize.2 rms2 rom size select 2 romsize.1 rms1 rom size select 1 romsize.0 rms0 rom size select 0 trim.7 - 0 all rtc trim functions rtcc.2 rtcwe rtc write enab le rtcc.0 rtce rtc oscillator enable eprom programming the DS87C530 follows standards for a 16 - kbyte eprom version in the 8051 family. it is available in a uv erasable, ceramic windowed package and in plastic packages for one - time user - programmable ve rsions. the part has unique signature information so programmers can support its specific eprom options. programming procedure the DS87C530 should run from a clock speed between 4 and 6 mhz when programmed. the programming fixture should apply address in formation for each byte to the address lines and the data value to the data lines. the control signals must be manipulated as shown in table 10. the diagram in figure 5 shows the expected electrical connection for programming. note that the programmer mus t apply addresses in demultiplexed fashion to ports 1 and 2 with data on port 0. waveforms and timing are provided in the electrical specifications. program the DS87C530 as follows: 1. apply the address value, 2. apply the data value, 3. select the programming o ption from table 10 using the control signals, 4. increase the voltage on v pp from 5v to 12.75v if writing to the eprom, 5. pulse the prog signal five times for eprom array and 25 times for encryption table, lock bits, and other eprom bits, 6. repeat as many times as necessary. security options the DS87C530 employs a standard three - level lock that restricts viewing of the eprom contents. a 64 - byte encryption array allows the authorized user to verify memory by presenting the data in encrypted form. lock bits the security lock consists of 3 lock bits. these bits select a total of 4 levels of security. higher levels provide increasing security but also limit application flexibility. table 11 shows the security settings. note that the programmer cannot directly read the state of the security lock. user software has access to this information as described in the memory section. encryption array the encryption array allows an authorized user to verify eprom without allowing the true memory to be d umped. during a verify, each byte is exclusive nored (xnor) with a byte in the encryption array.
DS87C530/ds83c530 27 of 44 this results in a true representation of the eprom while the encryption is unprogrammed (ffh). once the encryption array is programmed in a non - ffh state, the verify value will be encrypted. for encryption to be effective, the encryption array must be unknown to the party that is trying to verify memory. the entire eprom also should be a non - ffh state or the encryption array can be discovered. the encryption array is programmed as shown in table 10. note that the programmer can not read the array. also note that the verify operation always uses the encryption array. the array has no impact while ffh. simply programming the array to a non - ffh state will caus e the encryption to function. other eprom options the DS87C530 has user selectable options that must be set before beginning software execution. these options use eprom bits rather than sfrs. program the eprom selectable options as shown in table 10. t he option register sets or reads these selections. the bits in the option control register have the following function: bit 7 - 4 reserved, program to a 1. bit 3 watchdog por default. set=1; watchdog reset function is disabled on power - up. set=0; watchdo g reset function is enabled automatically. bit 2 - 0 reserved. program to a 1. signature the signature bytes identify the product and programming revision to eprom programmers. this information is at programming addresses 30h, 31h, and 60h. this informatio n is as follows:: address value meaning 30h dah manufacturer 31h 30h model 60h 01h extension eprom programming modes table 10 mode rst psen ale/ prog ea/vpp p2.6 p2.7 p3.3 p3.6 p3.7 program code data h l pl 12.75v l h h h h verify code data h l h h l l l h h program encryption array address 0 - 3fh h l pl 12.75v l h h l h lb1 h l pl 12.75v h h h h h lb2 h l pl 12.75v h h h l l program lock bits lb3 h l pl 12.75v h l h h l program option register a ddress fch h l pl 12.75v l h h l l read signature or option registers 30, 31, 60, fch h l h h l l l l l * pl indicates pulse to a logic low.
DS87C530/ds83c530 28 of 44 eprom lock bits table 11 level lock bits protection lb1 lb2 lb3 1 u u u no program lock. encrypted verify if encryption table was programmed. 2 p u u prevent movc instructions in external memory from reading program bytes in internal memory. ea is sampled and latched on reset. allow no further programming of eprom. 3 p p u level 2 plus no verify operation. also, prevent movx instructions in external memory from reading sram (movx) in internal memory. 4 p p p level 3 plus no external execution. eprom programming configuration figure 5 rom - specific features the ds83c530 supports a subse t of the eprom features found on the DS87C530. security options lock bits the ds83c530 employs a lock that restricts viewing of the rom contents. when set, the lock will prevent movc instructions in external memory from reading program bytes in internal memory. when locked, the ea pin is sampled and latched on reset. the lock setting is enabled or disabled when the devices are manufactured according to customer specifications. the lock bit cannot be read in software, and its status ca n only be determined by observing the operation of the device.
DS87C530/ds83c530 29 of 44 encryption array the ds83c530 encryption array allows an authorized user to verify rom without allowing the true memory contents to be dumped. during a verify, each byte is exclusive nored (xn or) with a byte in the encryption array. this results in a true representation of the rom while the encryption is unprogrammed (ffh). once the encryption array is programmed in a non - ffh state, the encryption array is programmed (or optionally left unprogr ammed) when the devices are manufactured according to customer specifications. ds83c530 rom verification the ds83c530 memory contents can be verified using a standard eprom programmer. the memory address to be verified is placed on the pins shown in figur e 5, and the programming control pins are set to the levels shown in table 10. the data at that location is then asserted on port 0. ds83c530 signature the signature bytes identify the ds83c530 to eprom programmers. this information is at programming addr esses 30h, 31h, and 60h. because mask rom devices are not programmed in device programmers, most designers will find little use for the feature, and it is included only for compatibility. address value meaning 30h dah manufacturer 31h 31h mode l 60h 01h extension absolute maximum ratings* voltage on any pin relative to ground - 0.3v to +7.0v operating temperature 0c to 70c storage temperature - 55c to +125c soldering temperature 260c for 10 seconds * this is a stress rating only and functional operation of the device at these or any other conditions above those indicated in the operation sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods of time may affect relia bility.
DS87C530/ds83c530 30 of 44 dc electrical characteristics parameter symbol min typ max units notes supply voltage v cc 4.5 5.0 5.5 v 1 power - fail warning v pfw 4.25 4.38 4.5 v 1 minimum operating voltage v rst 4.0 4.13 4.25 v 1 backup battery voltage v bat 2.5 3.0 v cc - 0.7 v supply current active mode @ 33 mhz i cc 30 ma 2 supply current idle mode @ 33 mhz i idle 15 ma 3 supply current stop mode, band - gap disabled i stop 1 m a 4 supply current stop mode, band - gap enabled i spbg 50 m a 4 backup supply current, data re tention mode i bat 0 0.5 m a 11 input low level v il - 0.3 +0.8 v 1 input high level v ih 2.0 v cc +0.3 v 1 input high level xtal1 and rst v ih2 3.5 v cc +0.3 v 1 output low voltage @ i ol =1.6 ma v ol1 0.15 0.45 v 1 output low voltage ports 0, 2, ale , and psen @ i ol =3.2 ma v ol2 0.15 0.45 v 1 output high voltage ports 1, 2, 3, ale, psen @ i oh = - 50 m a v oh1 2.4 v 1, 6 output high voltage ports 1, 2, 3 @ i oh = - 1.5 ma v oh2 2.4 v 1, 7 output high volta ge port 0 in bus mode i oh = - 8 ma v oh3 2.4 v 1, 5 input low current ports 1, 2, 3 @ 0.45v i il - 55 m a 12 transition current from 1 to 0 ports 1, 2, 3 @ 2v i tl - 650 m a 8 input leakage port 0, ea , pins, i/o mode i l - 10 +10 m a 10 input leakage port 0, bus mode i l - 300 +300 m a 9 rst pull - down resistance r rst 50 200 k w
DS87C530/ds83c530 31 of 44 notes for dc electrical characteristics: all parameters apply to both commercial and industrial temperature operation unless otherwise noted. 1. all voltages are referenced to ground. 2. active current measured with 33 mhz clock source on xtal1, v cc =rst=5.5v, other pins disconnected. 3. idle mode current measured with 33 mhz clock source on xtal1, v cc =5.5v, rst at ground, other pins disconnected. 4. stop mode current mea sured with xtal1 and rst grounded, v cc =5.5v, all other pins disconnected. this value is not guaranteed. users that are sensitive to this specification should contact dallas semiconductor for more information. 5. when addressing external memory. 6. rst=v cc . thi s condition mimics operation of pins in i/o mode. port 0 is tristated in reset and when at a logic high state during i/o mode. 7. during a 0 to 1 transition, a one - shot drives the ports hard for two clock cycles. this measurement reflects port in transition mode. 8. ports 1, 2, and 3 source transition current when being pulled down externally. it reaches its maximum at approximately 2v. 9. 0.45 DS87C530/ds83c530 32 of 44 ac electrical characteristics 33 mhz variable clock parameter symbol min max min max units oscillator freq. (ext. osc.) (ext. crystal ) 1/t clcl 0 1 33 33 0 1 33 33 mhz ale pulse width t lhll 40 1.5t clcl - 5 ns port 0 address valid to ale low t avll 10 0.5t clcl - 5 ns address hold after ale low t llax1 10 0.5t clcl - 5 ns a le low to valid instruction in t lliv 56 2.5t clcl - 20 ns ale low to psen low t llpl 10 0.5t clcl - 5 ns psen pulse width t plph 55 2t clcl - 5 ns psen low to valid instr. in t pliv 41 2t clcl - 20 ns i nput instruction hold after psen t pxix 0 0 ns input instruction float after psen t pxiz 26 t clcl - 5 ns port 0 address to valid instr. in t aviv 71 3t clcl - 20 ns port 2 address to valid instr. in t aviv2 81 3.5t cl cl - 25 ns psen low to address float t plaz 0 0 ns notes for ac electrical characteristics: all parameters apply to both commercial and industrial temperature range operation unless otherwise noted. all signals rated over operating tem perature. all signals characterized with load capacitance of 80 pf except port 0, ale, psen , rd and wr with 100 pf. interfacing to memory devices with float times (turn off times) over 25 ns may cause contention. this will not damage the parts, but will cause an increase in operating current. specifications assume a 50% duty cycle for the oscillator. port 2 and ale timing will change in relation to duty cycle variation.
DS87C530/ds83c530 33 of 44 movx characteristics using stretch memory cycles variable clock parameter symbol min max units stretch data access ale pulse width t lhll2 1.5t clcl - 5 2t clcl - 5 ns t mcs =0 t mcs >0 address hold after ale low for movx write t llax2 0.5t clcl - 5 t clcl - 5 ns t mcs =0 t mcs >0 rd pulse width t rlrh 2t clcl - 5 t mcs - 10 ns t mcs =0 t mcs >0 wr pulse width t wlwh 2t clcl - 5 t mcs - 10 ns t mcs =0 t mcs >0 rd low valid data in t rldv 2t clcl - 20 t mcs - 2 0 ns t mcs =0 t mcs >0 data hold after read t rhdx 0 ns data float after read t rhdz t clcl - 5 2t clcl - 5 ns t mcs =0 t mcs >0 ale low to valid data in t lldv 2.5t clcl - 20 t mcs +t clcl - 40 ns t mcs =0 t mcs >0 port 0 address to vali d data in t avdv1 3t clcl - 20 t mcs +1.5t clcl - 20 ns t mcs =0 t mcs >0 port 2 address to valid data in t avdv2 3.5t clcl - 20 t mcs +2t clcl - 20 ns t mcs =0 t mcs >0 ale low to rd or wr low t llwl 0.5t clcl - 5 t c lcl - 5 0.5t clcl +5 t clcl +5 ns t mcs =0 t mcs >0 port 0 address to rd or wr low t avwl1 t clcl - 5 2t clcl - 5 ns t mcs =0 t mcs >0 port 2 address to rd or wr low t a vwl2 1.5t clcl - 10 2.5t clcl - 10 ns t mcs =0 t mcs >0 data valid to wr transition t qvwx - 5 ns data hold after write t whqx t clcl - 5 2t clcl - 5 ns t mcs =0 t mcs >0 rd low to address float t rlaz - 0.5t c lcl - 5 ns rd or wr high to ale high t whlh 0 t clcl - 5 10 t clcl +5 ns t mcs =0 t mcs >0 note: t mcs is a time period related to the stretch memory cycle selection. the following table shows th e value of t mcs for each stretch selection.
DS87C530/ds83c530 34 of 44 m2 m1 m0 movx cycles t mcs 0 0 0 2 machine cycles 0 0 0 1 3 machine cycles (default) 4 t clcl 0 1 0 4 machine cycles 8 t clcl 0 1 1 5 machine cycles 12 t clcl 1 0 0 6 machine cycles 16 t clcl 1 0 1 7 machin e cycles 20 t clcl 1 1 0 8 machine cycles 24 t clcl 1 1 1 9 machine cycles 28 t clcl external clock characteristics parameter symbol min typ max units notes clock high time t chcx 10 ns clock low time t clcx 10 ns clock rise time t clcl 5 ns cl ock fall time t chcl 5 ns serial port mode 0 timing characteristics parameter symbol min typ max units notes serial port clock cycle time sm2=0, 12 clocks per cycle sm2=1, 4 clocks per cycle t xlxl 12t clcl 4t clcl ns ns output data s etup to clock rising sm2=0, 12 clocks per cycle sm2=1, 4 clocks per cycle t qvxh 10t clcl 3t clcl ns ns output data hold from clock rising sm2=0, 12 clocks per cycle sm2=1, 4 clocks per cycle t xhqx 2t clcl t clcl ns ns inpu t data hold after clock rising sm2=0, 12 clocks per cycle sm2=1, 4 clocks per cycle t xhdx t clcl t clcl ns ns clock rising edge to input data valid sm2=0, 12 clocks per cycle sm2=1, 4 clocks per cycle t xhdv 11t clcl 3t clcl ns ns explanation of ac symbols in an effort to remain compatible with the original 8051 family, this device specifies the same parameters as such devices, using the same symbols. for completeness, the following is an explanation of the symbols. t tim e a address c clock d input data h logic level high l logic level low i instruction p psen q output data r rd signal v valid w wr signal x no longer a valid logic level z tristate
DS87C530/ds83c530 35 of 44 power cycle timing characteristics parameter symbol min typ max units notes cycle startup time t csu 1.8 ms 1 power - on reset delay t por 65536 t clcl 2 notes for power cycle timing: 1. startup time for crystals varies with load capacitance and manufactur er. time shown is for an 11.0592 mhz crystal manufactured by fox. 2. reset delay is a synchronous counter of crystal oscillations after crystal startup. at 33 mhz, this time is 1.99 ms. eprom programming and verification (21 c to 27 c; v cc =4.5v to 5.5v) parameter symbol min typ max units notes programming voltage v pp 12.5 13.0 v 1 programming supply current i pp 50 ma oscillator frequency 1/t clcl 4 6 mhz address setup to prog low t avgl 48t clcl address hold after prog t ghax 48t clcl data setup to prog low t dvgl 48t clcl data hold after prog t ghdx 48t clcl enable high to v pp t ehsh 48t clcl v pp setup to prog low t shgl 10 m s v pp hold after prog t ghsl 10 m s prog width t glgh 90 110 m s address to data valid t avqv 48t clcl enable low to data valid t elqv 48t clcl data float after enable t ehqz 0 48t clcl prog high to prog low t ghgl 10 m s note: 1. all voltages are referenced to ground.
DS87C530/ds83c530 36 of 44 external program memory read cycle external data memory read cycle
DS87C530/ds83c530 37 of 44 data memory write cycle data memory write with stretch =1
DS87C530/ds83c530 38 of 44 data memory write with stretch=2 external clock drive
DS87C530/ds83c530 39 of 44 serial port mode 0 timing
DS87C530/ds83c530 40 of 44 power cycle timing eprom programming and verification waveforms
DS87C530/ds83c530 41 of 44 52 - pin plcc pkg 52 - pin dim min max a 0.165 0.180 a1 0.090 0.120 a2 0.020 - b 0.0 26 0.032 b1 0.013 0.021 c 0.008 0.013 ch1 0.042 0.048 d 0.785 0.795 d1 0.750 0.756 d2 0.690 0.730 e 0.785 0.795 e1 0.750 0.756 e2 0.690 0.730 e1 0.050 bsc n 52 - 56 - g4006 - 001
DS87C530/ds83c530 42 of 44 52 - pin cer quad pkg 52 - pin dim min max a 0.165 0.185 a1 0.040 - b 0.026 0.032 b1 0.013 0.021 c 0.008 0.013 ch1 - 45 0.035 0.040 d 0.760 0.800 d1 0.740 0.770 d2 0.700 0.730 e 0.760 0.800 e1 0.740 0.770 e2 0.700 0.730 e1 0.050 bsc n 52 - 56 - g4007 - 001
DS87C530/ds83c530 43 of 44 52 - pin tqfp pkg 52 - pin dim min nom max a - - 1.20 a1 0.05 0.10 0.15 a2 0.95 1.00 1.05 b 0.25 0.32 0.40 c 0.09 - 0.20 d 11.80 12.00 12.20 d1 10.00 bsc e 11.80 12.00 12.20 e1 10.00 bsc e 0.65 bsc l 0.45 0.60 0.75
DS87C530/ds83c530 44 of 44 data sheet revision summary the following represent the key d ifferences between 02/20/97 and 07/07/98 version of the DS87C530 data sheet. please review this summary carefully. 1. add ds83c530 to data sheet. 2. updated pmm operating current estimates. 3. added note to clarify i il specification. 4. added note to prevent accid ental corruption of watchdog timer count while changing counter length. 5. changed i bat specification to 1 m a over extended temperature range. 6. changed minimum oscillator frequency to 1 mhz when using external crystal. 7. changed rst pulldown resistance from 1 70 k w to 200 k w maximum. 8. corrected ?data memory write with stretch? diagrams to show falling edge of ale coincident with rising edge of c3 clock. the following represent the key differences between 06/08/95 and 02/20/97 version of the DS87C530 data sheet . please review this summary carefully. 1. update ale pin description. 2. add note pertaining to erasure window. 3. add note pertaining to internal movx sram. 4. change note 6 from rst=5.5v to rst=v cc . 5. change note 10 from rst=5.5v to rst=v cc . 6. change serial port mode 0 timing diagram label from t qvxl to t qvxh . 7. add information pertaining to 52 - pin tqfp package.


▲Up To Search▲   

 
Price & Availability of DS87C530

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X